  <?php 

    	$title="";
		if(isset($_GET['ext'])){
			
			 switch($_GET['ext']){
			 	case 'date': $title='Mới Đăng ';break;
				case 'views': $title='Xem Nhiều ';  break;
				case 'view_day': $title='Top Ngày';  break;
				case 'view_week': $title='Top Tuần';  break;
				case 'view_month': $title='Top Tháng';  break;
				case 'thanks': $title='Thanks '; break;
				case 'sochapter': $title='Số Chapter ';  break;
				case 'hoanthanh': $title=' Truyện Full ';break;
				case 'pick': $title=' Đề Cử';break;
			 }
		}
		?>
<div class="container detail-info" id="theload-wrapper">
	<div id="row"> <!-- Start Row -->
	 <h1>Truyện <?php echo $data['theloai']['ten']." ".$title;?></h1>	
  					<div class="box">
                    	<?php if($_SESSION['mobile']==0){ echo '<ul xmlns:v="http://rdf.data-vocabulary.org/#" class="breadcrumb breadcrumb_manga">' ;}else{ echo '<ul xmlns:v="http://rdf.data-vocabulary.org/#" class="breadcrumb">';}?>
                       	<li typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo HOME; ?>"><i class="fa fa-home"></i> Home</a></li>
                        <li typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo TRUYEN_URL; ?>">Truyện</a></li>
                        <li typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']); ?>"><?php echo $data['theloai']['ten'] ?></a></li> 						 
                        <?php if($title!=""){ echo "<li class='active'><a href='".truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias'])."/".$_GET['ext']."'>$title</a></li>";	  }?> 
                        </ul>
                    </div>
                  	<div class="clearfix"></div>
                      	
                        
                         <blockquote class="hidden-xs" style="background-color:#fbfbfb; margin-bottom: 5px;"><small>Bạn đang xem  danh sách thể loại <b> Truyện  <?php echo $data['theloai']['ten']." ".$title; ?></b>. <?= DOMAIN_NAME; ?> luôn cập nhật những <b>truyện  <?php echo $data['theloai']['ten']." ".$title; ?></b> tiếng việt để phục vụ đông đảo người xem. Hi vọng các bạn có thể tìm thấy đúng <b>truyện  <?php echo $data['theloai']['ten']." ".$title; ?></b> yêu thích của mình. </small></blockquote>
                        
                        
  </div><!-- end row -->                      
                        
      </div><!-- end wrapMain Head -->

		<?php if(!isset($_GET['ext'])){?>
       <div class="container detail-info" style=" background-color: transparent" >   
        <?php if($data['decu_page']>0){ truyen_render_desktop_slide($data['decu'],'truyen_category_'.$data['theloai']['id'].'_pick',$data['decu_page'],'HOT PICK', truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']).'/pick');   }?>
        <?php  if($data['moi_page']>0){truyen_render_desktop_slide($data['moi'],'truyen_category_'.$data['theloai']['id'].'_moi',$data['moi_page'],'MỚI NHẤT', truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']).'/date');  } ?>    
        </div>          
        <?php }?>                
         <div class="container detail-info" style=" background-color: transparent" >  <!-- Start wrap main body theloai -->
         <div class="row">
         <div class="col-md-12">      
             <div class="panel-truyen" style="margin-bottom:0px">
                       <a href="<?php echo truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']) ?>" class="panel-title-a"><?php echo $data['theloai']['ten'] ?></a>
               </div> <!-- End panel-title -->          
             			<?php 
						$bu2=truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']);
						$bu=truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']).'/'; ?>
      <div class='home_nav' style="padding-bottom:5px">
  <ul class="nav nav-pills">
<li <?php if(!isset($_GET['ext'])){ echo 'class="active"';}?>><a href="<?php echo $bu2 ?>">Mới Cập Nhật</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='view_day'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>view_day">Top Ngày</a></li>
<li  <?php if(isset($_GET['ext']) && $_GET['ext']=='view_week'){ echo 'class="active"';}?>><a href="<?php echo $bu ?>view_week">Top Tuần</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='view_month'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>view_month">Top Tháng</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='views'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>views">Top View</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='date'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>date">Mới Đăng</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='pick'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>pick">Đề Cử</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='sochuong'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>sochuong">Số Chương</a></li>
<li <?php if(isset($_GET['ext']) && $_GET['ext']=='hoanthanh'){ echo 'class="active"';}?>><a  href="<?php echo $bu ?>hoanthanh">Hoàn Thành</a></li>
 </ul>
 </div>
       
       <div id="paging_content" class="truyen_list">
         <div class="wrap-paging-loading" id="wrap-paging-loading" style="display: none;">
                            <span class="paging-loading" id="paging-loading"><img alt="loading" src="public/images/loading11.gif"></span><br>
          </div>
            <div style="text-align:center"><?php echo $data['nav']; ?></div>
         	<?php
			echo truyen_render_list_item($data['info']);
			?>
         <div style="text-align:center"><?php echo $data['nav']; ?></div> 
        </div>
    
		</div> <!-- End col -md-8 -->
        <div class="col-md-4">
        	<!-- Content Right Here -->
        </div>
        </div> <!-- End row -->
  


<div class="clearfix"></div>
</div><!-- end wrapMain -->

      <script type="text/javascript">
	function ajax_pagination(page){
		
			 $('#wrap-paging-loading')
			.css('width', $(('#wrap-paging-loading')).parent().width())
			.css('height', $(('#wrap-paging-loading')).parent().height())
			.css('opacity', '1').css('position', 'absolute')
			.css('z-index','999').css('display', 'block');
			$('.paging-loading').center();
			 $('#paging_content').css('opacity', '0.3').css('background-color','#fff');
		
			$.ajax({
			url : "<?php echo truyenf1_url_truyen_theloai($data['theloai']['id'],$data['theloai']['alias']); ?>",
	    	type : 'POST',
    		data : {
				page :page,
				ajax_pagination: 1,
				ext:'<?php echo $_GET['ext']; ?>'
			},
    		success: function(data, textStatus, jqXHR){
				$('#paging_content').html(data);
		  },
		   complete: function(){
						$('#wrap-paging-loading').css('display', 'none');
						 $('#paging_content').css('opacity', '1');
						$('#paging_content').find('.lazy').lazyload();
						
		},
		  cache: false
		});

	}
	</script> 